package com.rr.springcloud.service.impl;

import com.rr.springcloud.dao.PaymentDAO;
import com.rr.springcloud.pojo.Payment;
import com.rr.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author RR
 * @date 2021/3/14 23:33
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    @Autowired
    private PaymentDAO paymentDAO;

    @Override
    public int insertPayment(Payment payment) {
        return paymentDAO.insert(payment);
    }

    @Override
    public Payment findById(Long id) {
        return paymentDAO.selectByPrimaryKey(id);
    }
}
